package org.cogaen.java2d;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Shape implements Serializable {

	private static final long serialVersionUID = 5864128629310801619L;
	
	private List<Polygon> polygons = new ArrayList<Polygon>();
	
	
	public void addPolygon(Polygon poly) {
		this.polygons.add(poly);
	}
	
	public int numOfPolygons() {
		return this.polygons.size();
	}
	
	public Polygon getPolygon(int idx) {
		return this.polygons.get(idx);
	}
	
	public void scale(double x, double y) {
		for (Polygon poly : this.polygons) {
			poly.scale(x, y);
		}
	}
	
}
